<template>
  <div>
    <Card />
  </div>
</template>

<script setup lang="ts">
import { onBeforeRouteLeave } from "vue-router";
import Card from "../components/Card.vue";

onBeforeRouteLeave((to, from) => {
  const confirmLeave = window.confirm("确认要离开吗？您的更改尚未保存！")
  if (!confirmLeave) return false
})
</script>
